package run.liuli.tran.user.controller;

import org.quartz.SchedulerException;
import org.springframework.web.bind.annotation.*;
import run.liuli.tran.user.service.UserService;

import javax.annotation.Resource;

@RestController
@RequestMapping("/")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/")
    public String getUserAll(){
        return userService.list().toString();
    }

    @GetMapping("/post/{uid}/{money}")
    public void post(@PathVariable Long uid,@PathVariable Long money) throws SchedulerException {
        userService.post(uid,money);
    }
}
